package com.yunxi.service.localService.sys;

import com.github.pagehelper.PageInfo;
import com.yunxi.core.service.IServicePlus;
import com.yunxi.core.web.LoginInfo;
import com.yunxi.model.sys.User;
import com.yunxi.sys.pojo.UserVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Created by xuruzi on 2017/5/3.
 */
public interface UserService extends IServicePlus<User> {
    @Transactional(timeout = 5000, readOnly = true)
    UserVO findUserByUserCode(Map map);

    @Transactional(timeout = 5000, readOnly = true)
    PageInfo<User> findPageByList(Map<String, Object> map);

    @Transactional(timeout = 5000, rollbackFor = Exception.class)
    UserVO saveCas(UserVO User, LoginInfo sysUser) throws Exception;

    @Transactional(timeout = 5000, readOnly = true)
    UserVO getCasId(String id);

    void resetPassword(UserVO user) throws Exception;

    void updatePassword(UserVO user) throws Exception;

    UserVO findPdaUserByUserCode(Map map);

    UserVO getByUserCode(String accountNo);
}
